/**
 * 正则
 */
/** 手机号*/
const phone = (phone) => /^(\+86)?1\d{10}$/.test(phone);
/** 密码*/
const password = (password) => /^[a-zA-Z0-9]\w{5,15}$/.test(password);
/** 验证码*/
const checkcode = (checkcode) => /^\d{3,7}$/.test(checkcode);
/** 数字*/
const number = (number) => /^[0-9]{1,}$/.test(number);
/** 身份证*/
const ID = (ID) => /^\d{15}|\d{17}[0-9Xx]$/.test(ID);
/** 邮箱*/
const email = (email) => /^\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}$/.test(email);
/** 银行卡*/
const card = (card) => /^\d{16}|\d{19}$/.test(card);
/** 邮编*/
const code = (code) => /^d{6}$/.test(code);
/** 昵称*/
const nick = (nick) => /^[A-Za-z0-9_\-\u4e00-\u9fa5]+$/.test(nick);
/** URL*/
const url = (url) => /^https:|http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/.test(url);
export default {
  phone, password, checkcode, ID, email, card, code, nick, url, number
};